namespace a = "http://relaxng.org/ns/compatibility/annotations/1.0"

start =
  
  ## Root element. Describes the whole library.
  element library {
    
    ## Describes a book.
    element book {
      
      ## Identifier
      attribute id { xsd:token },
      
      ## Is the book available?
      attribute available { xsd:boolean },
      
      ## ISBN number
      element isbn { xsd:token },
      
      ## Title of the book
      element title {
        xsd:token,
        
        ## Language
        attribute xml:lang { xsd:language }
      },
      
      ## Author of a book
      element author {
        
        ## Identifier
        attribute id { xsd:token },
        
        ## Name
        element name { xsd:token },
        
        ## Date of birth
        element born { xsd:date },
        
        ## Date of death
        element dead { xsd:date }
      }*,
      
      ## Character of a book
      element character {
        
        ## Identifier
        attribute id { xsd:token },
        
        ## Name
        element name { xsd:token },
        
        ## Date of birth
        element born { xsd:date },
        
        ## Qualification of a character
        element qualification { xsd:token }
      }*
    }*
  }
